package com.example.warehouse_manager.mapper;

//user_info表的mapper接口

import com.example.warehouse_manager.entity.User;
import com.example.warehouse_manager.page.Page;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface UserMapper {

    //根据账号查询用户信息
    public User findUserByCode(String userCode);

    //查询用户行数
    public Integer findUserRowCount(User user);

    //分页查询用户
    public List<User> findUserByPage(User user, Page page);

    //添加用户
    public int insertUser(User user);

    //更新用户启用、禁用状态
    public int updateState(User user);

    //根据用户id修改用户状态的方法
    public int setStateByUid(Integer userId,String userState);

    //根据用户ids修改用户为删除状态
    public int setIsDeleteByUids(List<Integer> userIdList);

    //根据用户id修改用户昵称
    public int setUserNameById(User user);

    //根据用户id重置密码
    public int setPwdById(Integer userId,String password);

}
